<?php

class TextArea extends PageElement
{
	private $columns=0;
	private $rows=0;
	
	public function __construct()
	{
	}
	
	public function setRows($rows)
	{
		$this->rows=$rows;
	}
	
	public function setColumns($columns)
	{
		$this->columns=$columns;
	}
	
	private function getSizeHTML()
	{
		$html="";
		if($this->rows!=0)
		{
			$html.="rows=\"".$this->rows."\" ";
			
		}
		if($this->columns!=0)
		{
			$html.="cols=\"".$this->columns."\" ";
		}
		return $html;
	}

	public function getHTML()
	{
		$html = "<textarea ".$this->getSizeHTML().parent::getHTML().">".$this->text."</textarea>\n";
		return $html;
	}
}

?>